from  time import *

begin=time()
i=2
while i<=10000:
    j=2
    flag=True
    while j<=i**0.5:
        if i%j==0:
            flag=False
            break
        j+=1
    if flag:
        print(i)
    i+=1
end=time()
print('运行了',end-begin,'秒')